1. Field of the Invention
The present invention relates to a technique of receiving digital image data from outside of a device, storing, processing, and then outputting it.
2. Description of the Related Art
Among image processing apparatuses represented by copying machines and multi function peripherals, image processing apparatuses which have reading and printing units with higher resolution so as to process a high-resolution image are recently becoming popular in order to create a high-quality image. For this reason, the amount of image data to be processed by the device main body is remarkably increasing. Although the device main body needs to store such enormous image data, it is difficult to hold a lot of large image data because of the limited capacity of the main memory. Even when high-speed processing is necessary, the data bus of the main circuit is burdened with the enormous data amount, and therefore, data is transferred slowly, resulting in difficulty in high-speed processing.
Against this backdrop, there is used an image processing apparatus employing encoding processing of decreasing the data amount of large image data without degrading its image quality. A typical example of encoding compression processing is JPEG. Using discrete cosine transform, the JPEG compresses image data for every 8×8 or 16×16 pixel block, thereby implementing a high compression ratio. There has also been proposed a technique of dividing image data into smaller blocks, for example, 2×2 pixel blocks, determining the representative color and interpolation representative color of each of the blocks, and encoding them (Japanese Patent Laid-Open No. 2004-104621). Image data to be held in the device for such high-resolution image data processing need to be appropriately encoded and compressed not to put a burden on the memory or the data bus.
An image processing device inputs image data from outside, and processes and outputs it, as described above. A representative function of such an image processing device is a copy function of causing a scanner to read image data, converting it into digital image data, and outputting it on a paper sheet. Concerning the copy function, image processing is performed inside the device for the image data input from the reading unit. The image density or tint is changed to adjust the output image. An example of image processing most often used is image mask processing. Examples of image mask are frame erase functions such as a peripheral mask for erasing shadows at original edges, book frame erase for erasing the shadow at the center of a book original, and punch hole erase for erasing the punch holes of an original. Such image mask processing is a function of filling part of a digital image with a specific color. That is, processing fills part of a data area storing a digital image with specific data.
Applying image mask processing to the above-described high-resolution image poses two problems. The first is the problem of a process time caused by data filling. Although processing of filling image data with specific image data is simple in itself, frequent memory access and an enormous processing amount entail a longer memory write time. A high-resolution image requires a still longer process time because of the larger data filling amount. The second problem is the necessity of a decoding process time as encoded image data need be temporarily decoded. A high-resolution image in the form of raw image data is enormous in terms of data amount and is therefore held after encoded and compressed into, for example, the above-described JPEG format. However, an image compressed by a raster image compression method represented by JPEG encoding cannot partially be masked in the compressed state. To do this, it is necessary to temporarily decode the image into raw image data and then execute image data filling. Hence, the process time of decoding processing is added for the image mask. In addition, for this intermediate decoding, an intermediate buffer after the decoding is needed, and the memory accordingly needs to have an appropriate capacity.